Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the “upgrade” terminology across the unit-test framework into “update”, aligning naming in the core runtime, e2e test contracts, tests, and documentation while preserving the underlying behavior (queued bytecode replacement effective on the next block).
Changes:
- Renames upgrade-related runtime internals and messages in
ContractRuntime(e.g., pending upgrade state → pending update state). - Updates e2e contracts and tests to use
update(...)/Updatable*naming and updated WASM build outputs. - Updates documentation links and terminology to “Updatable Contracts” and the updated phase naming.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/imports/UpdateFromAddress.test.ts | Renames test flow and calls from upgrade to update, plus updated runtime import and WASM path. |
| test/e2e/contracts/updatable-contract/runtime/UpdatableContractRuntime.ts | Renames the test runtime wrapper class and selector/call from upgrade to update. |
| test/e2e/contracts/updatable-contract/contract/tsconfig.json | Adds contract TS config for the updatable v1 contract build. |
| test/e2e/contracts/updatable-contract/contract/index.ts | Points the contract entrypoint to UpdatableContract. |
| test/e2e/contracts/updatable-contract/contract/asconfig.json | Updates the WASM output names to match the new updatable naming. |
| test/e2e/contracts/updatable-contract/contract/UpdatableContract.ts | Renames the contract class and method from upgrade→update and calls updateContractFromExisting. |
| test/e2e/contracts/updatable-contract-v2/contract/tsconfig.json | Adds contract TS config for the updatable v2 contract build. |
| test/e2e/contracts/updatable-contract-v2/contract/index.ts | Points the v2 entrypoint to UpdatableContractV2. |
| test/e2e/contracts/updatable-contract-v2/contract/asconfig.json | Updates the v2 WASM output names to match the new updatable naming. |
| test/e2e/contracts/updatable-contract-v2/contract/UpdatableContractV2.ts | Renames the v2 contract class to UpdatableContractV2. |
| src/opnet/modules/ContractRuntime.ts | Renames internal “upgrade” pending/guard state and related helper methods/messages to “update”. |
| scripts/buildTestContracts.js | Updates build paths from upgradeable-* directories to updatable-*. |
| docs/writing-tests/custom-contracts.md | Updates documentation link text/path to “Updatable Contracts”. |
| docs/api-reference/blockchain.md | Updates example from upgrade(...) to update(...) and wording. |
| docs/advanced/updatable-contracts.md | Updates headings/content to use “update” terminology and the renamed internal mechanisms. |
| docs/advanced/transaction-simulation.md | Updates nav link to the updatable contracts doc. |
| docs/advanced/cross-contract-calls.md | Updates nav link to the updatable contracts doc. |
| docs/advanced/consensus-rules.md | Adjusts wording to “contract updates”. |
| docs/README.md | Updates advanced topic link text/path to “Updatable Contracts”. |
| SECURITY.md | Updates referenced mechanism name to applyPendingBytecodeUpdate. |
| README.md | Updates advanced topics wording from upgrades→updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Checklist
Build & Tests
npm installcompletes without errorsnpm testpasses all testsCode Quality
Documentation
Security
Testing
Related Issues
By submitting this PR, I confirm that my contribution is made under the terms of the project's license.